/**
 * @date: 2024-08-28 01:04:00
 * @description: 所有表格数据总条数
 * @modifyContent:
 * @author: Forever丿顾北
**/
const count = 1000

/**
 * @date: 2024-08-28 00:12:14
 * @description: GET请求,从config.url获取参数,POST请求,从config.body获取参数
 * @modifyContent:
 * @author: Forever丿顾北
**/
const Param2Obj = (url) =>{
  const search = url.split('?')[1]
  if (!search) {
    return {}
  }
  return JSON.parse(
    '{"' +
    decodeURIComponent(search)
      .replace(/"/g, '\\"')
      .replace(/&/g, '","')
      .replace(/=/g, '":"') +
    '"}'
  )
}

const Components = {
  count,
  Param2Obj
}

export default Components;